-- GENERATED SPELL FOR [Volida] --


function spell0_16058(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(20828,pUnit)
pUnit:RegisterEvent('Sorts_16058', 8336, 1)
end

function spell1_16058(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15063,pUnit)
pUnit:RegisterEvent('Sorts_16058', 8262, 1)
end

function spell2_16058(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16058', 7000, 1)
end

function spell3_16058(pUnit, Event) --@Ice Block,Self--
pUnit:FullCastSpellOnTarget(27619,pUnit)
pUnit:RegisterEvent('Sorts_16058', 10280, 1)
end

function Sorts_16058(pUnit, Event)
local choix_sorts_16058 = math.random(0, 3)
if choix_sorts_16058 == 0 then
pUnit:RegisterEvent('spell0_16058', 1, 1)
end
if choix_sorts_16058 == 1 then
pUnit:RegisterEvent('spell1_16058', 1, 1)
end
if choix_sorts_16058 == 2 then
pUnit:RegisterEvent('spell2_16058', 1, 1)
end
if choix_sorts_16058 == 3 then
pUnit:RegisterEvent('spell3_16058', 1, 1)
end
end

function mob16058_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16058', math.random(1500, 3000), 1)
end

function mob16058_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16058_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16058_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16058, 1, 'mob16058_Action')
RegisterUnitEvent(16058, 2, 'mob16058_Leave')
RegisterUnitEvent(16058, 3, 'mob16058_Kill')
RegisterUnitEvent(16058, 4, 'mob16058_Die')
